import { create } from 'zustand';

interface InteractStoreType {
  touch: boolean;
  controlDom: HTMLDivElement;
}
// 用户交互
const useInteractStore = create<InteractStoreType>((set) => ({
  touch: false,
  controlDom: document.createElement('div'),
}));

interface GameStoreType {
  time: number;
  transfer: boolean;
  bodyColor: string;
}

// 颜色
const useGameStore = create<GameStoreType>((set) => ({
  time: 0,
  transfer: false,
  bodyColor: '#26d6e9',
}));

interface LoadingStoreType {
  loading: boolean;
}

// 加载
const useLoadingStore = create<LoadingStoreType>((set) => ({
  loading: false,
}));

export {
  useInteractStore,
  useGameStore,
  useLoadingStore
};
